Skip to content

feat(123_open): update upload api v2 - #976

Merged
xrgzs merged 1 commit into
OpenListTeam:mainfrom
xrgzs:123open-put-v2
Aug 6, 2025
Merged

feat(123_open): update upload api v2#976
xrgzs merged 1 commit into
OpenListTeam:mainfrom
xrgzs:123open-put-v2

Conversation

@xrgzs

@xrgzs xrgzs commented Aug 4, 2025

Copy link
Copy Markdown
Member
  1. 更新 V2 上传接口
  2. 尝试使用上传+MD5秒传功能实现复制

@PIKACHUIM PIKACHUIM assigned PIKACHUIM, cxw620 and SenkjM and unassigned PIKACHUIM, cxw620 and SenkjM Aug 4, 2025
dezhishen
dezhishen previously approved these changes Aug 4, 2025
@SenkjM
SenkjM requested a review from Copilot August 4, 2025 08:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the 123 Open cloud storage driver to use the V2 upload API, implementing MD5-based instant upload functionality for copy operations. The changes modernize the upload process by moving from V1 to V2 endpoints and introducing multipart form uploads with MD5 verification.

  • Updated API endpoints from V1 to V2 for upload operations
  • Replaced URL-based chunk upload with multipart form data upload including MD5 verification
  • Added copy functionality using upload + MD5 instant upload feature

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
drivers/123_open/util.go Updated API endpoints to V2 and removed unused V1 endpoints
drivers/123_open/upload.go Refactored upload logic to use multipart forms with MD5 and moved completion logic
drivers/123_open/types.go Updated response structures for V2 API and removed obsolete types
drivers/123_open/driver.go Added copy functionality and enhanced Put method with proper completion polling
Comments suppressed due to low confidence (1)

Comment thread drivers/123_open/upload.go Outdated
Comment thread drivers/123_open/upload.go
Comment thread drivers/123_open/driver.go
Comment thread drivers/123_open/driver.go Outdated
@j2rong4cn
j2rong4cn marked this pull request as draft August 5, 2025 03:27
@xrgzs
xrgzs force-pushed the 123open-put-v2 branch 2 times, most recently from 5b8ecb7 to 2f56c9b Compare August 6, 2025 06:50
@xrgzs
xrgzs marked this pull request as ready for review August 6, 2025 06:54
@xrgzs
xrgzs requested a review from j2rong4cn August 6, 2025 06:54
@xrgzs

xrgzs commented Aug 6, 2025

Copy link
Copy Markdown
Member Author

试了下,传了个3GB的文件,没有问题,分片大小为

"sliceSize": 67108864,

@xrgzs
xrgzs merged commit 08dae4f into OpenListTeam:main Aug 6, 2025
12 checks passed
@xrgzs
xrgzs deleted the 123open-put-v2 branch August 6, 2025 07:27
if err != nil {
return err
}
_, err = utils.CopyWithBuffer(fw, rateLimitedRd)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么要用v2?v2支有表单吗?
使用表单即使是*os.File也需要读取到内存

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

V2 只有表单

io.Pipe 优化一下内存占用?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EnterTang pushed a commit to EnterTang/OpenList that referenced this pull request Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants